package com.larsgard.gedviewer.shared;

import java.io.Serializable;

import com.larsgard.gedviewer.shared.entities.Person;

public class PersonDetails implements Serializable {
    private static final long serialVersionUID = 3518873757817240185L;

    private Person mainPerson;
    private PersonDetails[] parents;
    private int depth, maxDepth;

    public void setMainPerson(Person mainPerson) {
	this.mainPerson = mainPerson;
    }

    public Person getMainPerson() {
	return mainPerson;
    }

    public void setParents(PersonDetails[] parents) {
	this.parents = parents;
    }

    public PersonDetails[] getParents() {
	return parents;
    }

    @Override
    public String toString() {
	if (mainPerson != null) {
	    return mainPerson.toString();
	}
	return "Anonymus Details";
    }

    public void setDepth(int depth) {
	this.depth = depth;
    }

    public int getDepth() {
	return depth;
    }

    public void setMaxDepth(int maxDepth) {
	this.maxDepth = maxDepth;
    }

    public int getMaxDepth() {
	return maxDepth;
    }

}
